<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        $message = '请登录';

  		switch( $this->getRequest()->getActionName() ){ // TODO sortir les actions ci-dessous dans un controller "ouvert"
  			
  			case 'index':
  				$access = false;
  		}
  		if ( !$access ){
  			$auth = Zend_Auth::getInstance();
          	if ( $auth->hasIdentity() )
              	$this->identity = $auth->getIdentity();
          	else{
              	$this->_redirect('/auth/login');
          	}
  		}
    }

    public function indexAction()
    {
    	
    	$this->_redirect('/user/league-history');
        // action body
    }

    
}

